﻿using System;
using System.IO;
using System.Web;

namespace ImageCropper.Util
{
    public static class Extensions
    {
        public static void DeleteFile(this string fileName)
        {
            fileName = HttpContext.Current.Server.MapPath(fileName);

            if (File.Exists(fileName))
            {
                try
                {
                    File.Delete(fileName);
                }
                catch (Exception ex)
                {
                    throw (ex);
                }
            }
        }
    }
}